﻿using System;
using System.Web.Security;

namespace FlowersStore
{
    public partial class Admin : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Admin"]==null)
                Response.Redirect("login.aspx");
        }

        protected void logout(object sender, EventArgs e)
        {
            Session.Remove("Admin");
            FormsAuthentication.SignOut();            
            FormsAuthentication.RedirectToLoginPage();
        }
    }
}